package top.frsf.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import top.frsf.interceptor.VisitInterceptor;

import java.util.concurrent.Executor;

/**
 * @Author FRSF
 * @Date 2022/6/30 14:13
 * @Description
 **/

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private VisitInterceptor visitInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(visitInterceptor).addPathPatterns("/patient/map");
    }
}
